<!-- templates/index.html -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>花艺AI测试应用</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body { padding-top: 2rem; }
        .header { margin-bottom: 2rem; }
        .form-container { max-width: 800px; margin: 0 auto; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header text-center">
            <h1>花艺AI测试应用</h1>
            <p class="lead">使用RAG系统和DeepSeek API进行花艺知识查询和设计</p>
            <nav class="nav justify-content-center">
                <a class="nav-link" href="/">首页</a>
                <a class="nav-link" href="/upload">上传知识</a>
                <a class="nav-link" href="/image">生成图像</a>
                <a class="nav-link" href="/status">系统状态</a>
            </nav>
        </div>

        <div class="form-container">
            <div class="card">
                <div class="card-header bg-primary text-white">
                    <h5 class="mb-0">花艺知识查询</h5>
                </div>
                <div class="card-body">
                    <form action="/query" method="post">
                        <div class="mb-3">
                            <label for="query" class="form-label">输入你的花艺问题:</label>
                            <textarea class="form-control" id="query" name="query" rows="3" required></textarea>
                        </div>
                        <div class="mb-3 form-check">
                            <input type="checkbox" class="form-check-input" id="generate_image" name="generate_image">
                            <label class="form-check-label" for="generate_image">生成相关图像</label>
                        </div>
                        <button type="submit" class="btn btn-primary">提交问题</button>
                    </form>
                </div>
                <div class="card-footer text-muted">
                    示例问题: "推荐适合中式插花的花材", "欧式插花与日式插花的区别", "如何搭配红色和白色的花"
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>